import React from 'react'
import { NavLink } from 'react-router-dom'
function Luyou(Com) {
    const token=localStorage.getItem('token')
  return ()=>{
    if(token){
        return <Com></Com>
    }else{
        return <NavLink to={'/login'}></NavLink>
    }
  }
}

export default Luyou
